package com.scwatch.ext.domain;

import com.scwatch.core.domain.User;

import javax.persistence.*;
import java.util.Date;

/**
 * 直播实体类
 */
@Entity
@Table(name = "cms_live_broadcast_address")
public class LiveBroadcastAddress implements  java.io.Serializable{
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "f_address_id", unique = true, nullable = false)
    @TableGenerator(name = "tg_cms_live_broadcast_address", pkColumnValue = "cms_live_broadcast_address", initialValue = 1, allocationSize = 10)
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "tg_cms_live_broadcast_address")
    private Integer id;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "f_user_id", nullable = false)
    private User user;

    @Column(name = "f_imput_address")
    private String imputAddress;//输入

    @Column(name = "f_out_address")
    private String outAddress;//输出

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "f_broadcast_id", nullable = false)
    private LiveBroadcast liveBroadcast;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "f_createtime")
    private Date createTime;

    @Column(name = "f_stream_file")
    private String streamName;//流文件名称

    public String getStreamName() {
        return streamName;
    }

    public void setStreamName(String streamName) {
        this.streamName = streamName;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getImputAddress() {
        return imputAddress;
    }

    public void setImputAddress(String imputAddress) {
        this.imputAddress = imputAddress;
    }

    public String getOutAddress() {
        return outAddress;
    }

    public void setOutAddress(String outAddress) {
        this.outAddress = outAddress;
    }

    public LiveBroadcast getLiveBroadcast() {
        return liveBroadcast;
    }

    public void setLiveBroadcast(LiveBroadcast liveBroadcast) {
        this.liveBroadcast = liveBroadcast;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
